<template>
	<view class="container">
		<uni-list style="font-size: 20px;">
			<uni-list-item thumb="/static/excell/xiaoshou.png" thumb-size="sm" clickable @click="toPcWebview('销售统计')"
				showArrow title="销售统计" />
			<uni-list-item thumb="/static/excell/shehuo.png" thumb-size="sm" clickable @click="toPcWebview('赊货统计')"
				showArrow title="赊货统计" />
			<uni-list-item thumb="/static/excell/shoukuan.png" thumb-size="sm" clickable
				@click="toPcWebview('收款统计')" showArrow title="收款统计" />
			<uni-list-item thumb="/static/excell/qiankuan.png" thumb-size="sm" clickable @click="toPcWebview('欠款统计')"
				showArrow title="欠款统计" />
			<uni-list-item thumb="/static/excell/yuqi.png" thumb-size="sm" clickable @click="toPcWebview('逾期统计')"
				showArrow title="逾期统计" />
			<uni-list-item thumb="/static/excell/yuqiday.png" thumb-size="sm" clickable @click="toPcWebview('逾期天数统计')"
				showArrow title="逾期天数统计" />
		</uni-list>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				token: "",
				// 公司信息
				CompanyInfo: {}

			}
		},
		onNavigationBarButtonTap() {
			uni.navigateTo({
				url: '/pages/user/user'
			})
		},
		onLoad() {
			// 获取token
			this.token = uni.getStorageSync('token')
			this.CompanyInfo = uni.getStorageSync('CompanyInfo')
		},
		onShow() {
			// 获取token
			this.token = uni.getStorageSync('token')
			this.CompanyInfo = uni.getStorageSync('CompanyInfo')
			console.log('获取登录的token', this.token, this.CompanyInfo)

		},
		methods: {
			// 跳转webviewpc页面
			toPcWebview(value) {
				console.log('value', value)
				let title = value
				uni.navigateTo({
					url: "/pages/excell/webview?CompanyId=" + this.CompanyInfo.Id + '&title=' + title + '&token=' +
						this.token.replace('Bearer ', '')
				})
			}

		}
	}
</script>

<style lang="scss" scoped>
	/deep/.uni-list-item__icon {
		margin-right: 0;
	}

	/deep/.uni-list-item__content-title {
		font-size: 18px;
	}

	/deep/.uni-list-item__content {
		height: 34px;
		line-height: 34px;
		// text-align: center;
	}

	.container {}
</style>